import request from '@/utils/request'

//通过模板组名、业务ID和业务类型查询流程节点列表
export function getNodesByTempateGroup(params: any) {
  return request({
    url: '/project/audit-process/nodes-by-template-group',
    method: 'get',
    params,
  })
}
// 获得审核流程分页(所有)
export function getAuditProcessPage(params: any) {
  return request({
    url: '/project/audit-process/page',
    method: 'get',
    params,
  })
}

// 查询待我审核的流程
export function getAuditProcessMypending(params: any) {
  return request({
    url: '/project/audit-process/my-pending',
    method: 'get',
    params,
  })
}

// 我提交的审核流程分页
export function getAuditProcessMyAuditPage(params: any) {
  return request({
    url: '/project/audit-process/my-audit-page',
    method: 'get',
    params,
  })
}

// 获得审核流程明细
export function getAuditProcessGetDetails(params: any) {
  return request({
    url: '/project/audit-process/get',
    method: 'get',
    params,
  })
}

// 导出审核流程
export function getAuditProcessExportExcel(params: any) {
  return request({
    url: '/project/audit-process/export-excel',
    method: 'get',
    responseType: 'blob',
    params,
  })
}

// 审核流程节点
export function postAuditProcessProcessNode(params: any) {
  return request({
    url: '/project/audit-process/audit-process-node',
    method: 'post',
    data: params,
  })
}
